package com.example.qu_tao.View;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;

import com.example.qu_tao.R;

public class YijianfankuiActivity extends AppCompatActivity {

    private EditText editTextFeedback;
    private Button buttonSubmit;
    private ImageView back;

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_yijianfankui);

        editTextFeedback = findViewById(R.id.editTextFeedback);
        back=findViewById(R.id.back_button);
        buttonSubmit = findViewById(R.id.buttonSubmit);

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        buttonSubmit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String feedback = editTextFeedback.getText().toString();
                if (feedback.isEmpty()) {
                    Toast.makeText(YijianfankuiActivity.this, "请输入想提交的信息", Toast.LENGTH_SHORT).show();
                } else {
                    Toast.makeText(YijianfankuiActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
}